package com.bjpowernode.mvc.controller;


import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RestController;

/*@CrossOrigin*/
@RestController
public class BaseController {

    //检查pageNo
    protected Integer defaultPageNo(Integer pageNo){
        Integer page=pageNo;
        if (pageNo == null || pageNo<1){
            page=1;
        }
        return page;
    }


    //检查pageSize
    protected Integer defaultPageSize(Integer pageSize){
        Integer size=pageSize;
        if (pageSize == null||pageSize<1){
            size=9;
        }
        return size;
    }
}
